{*include file="template/admin_head.htm"*}

<table id="containtable" cellspacing="0" cellpadding="0" class="{*$cf_controller*}">
    <tr>
        <td width="1979" valign="top" bgcolor="#FFFFFF">


            <div class="wrapper pr_8">
		{*if $cf_action=='add' || $cf_action=='edit'*}

                <script type="text/javascript">

		    $(function(){			
				
                call_uploader('#ad_photo_button','#ad_photo','ad',{'show':'#ad_photo_show'});				
                {*if $row['ad_photo'] *}
                    $("#ad_photo_show").append(show_photo_div("#ad_photo_button","#ad_photo_show","{*$row['ad_photo']*}","admin",false));
					
                {*/if*}

                $("#show_pid").change(function(){
                    var show_title = $(this).find("option:selected").text();
                    $("#show_title").val(show_title);
                });


		    });



                </script>

                <div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">新增/修改轮播图图</span>
                        <span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">轮播图图管理</a></span></div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">

                        <form name="act_form" id="act_form" method="post" action="{*$cf_self_page*}">
                            <input name="id" id="id" type="hidden" value="{*$row['ad_id']*}" />
                            <input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                            <input name="act" id="act" type="hidden" value="{*$cf_action*}" />
                            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
				<tbody>
				</tbody>
				<tbody>
				    <tr>
					<td colspan="2" class="stitle">轮播图信息</td>
				    </tr>
				    <tr>
					<td width="19%" align="right">轮播标题:</td>
					<td width="81%" align="left">
                        <input type="text" id="ad_title" name="ad_title" size="40" value="{*$row['ad_title']*}"  />
                    </td>
				    </tr>
                     <tr>
					<td width="19%" align="right">价格:</td>
					<td width="81%" align="left">
                        <input type="text" id="ad_price" name="ad_price" size="6" value="{*$row['ad_price']*}"  />
                    </td>
				    </tr>
					<tr>
					<td align="right">类型:</td>
					<td align="left">{*html_radios name=ad_type options=$cf_info_var['ad_type'] checked=$row['ad_type']|default:'0' *}</td>
				    </tr>				
				    <tr>
					<td height="69" align="right">轮播图图片:</td>
                        <td><span id='ad_photo_show'><img style="cursor:pointer" id="ad_photo_button" src="/public/images/admin/upload.jpg"  /></span>
                            <input type="hidden" name="ad_photo" id="ad_photo" value="{*$row['ad_photo']*}" />
                        </td>
				    </tr>
                    <tr>
					<td width="19%" align="right">图片尺寸:</td>
					<td width="81%" align="left">
                       宽度：<input type="text" size="6" id="ad_width"  name="ad_width" value="{*$row['ad_width']*}"  /> &nbsp;&nbsp;&nbsp;&nbsp;高度：<input type="text" size="6" id="ad_height" name="ad_height" value="{*$row['ad_height']*}"  /> 
                    </td>
				    </tr>
					<tr>
					<td width="19%" align="right">轮播图URL:</td>
					<td width="81%" align="left">
                        <input type="text" size="50" id="ad_url" name="ad_url" value="{*$row['ad_url']*}"  />
                    </td>
				    </tr>
					<tr>
					<td width="19%" align="right">排序:</td>
					<td width="81%" align="left">
                        <input type="text" size="5" id="ad_order" name="ad_order" value="{*$row['ad_order']|default:'99'*}"  /> <span class="red">0是最前</span>
                    </td>
				    </tr>
				    <tr>
					<td colspan="2" class="stitle">其它信息</td>
				    </tr>
				    
					<tr>
					<td width="19%" align="right">备注:</td>
					<td width="81%" align="left">
                        <input type="text" size="70" id="ad_remark" name="ad_remark" value="{*$row['ad_remark']*}"  />
                    </td>
				    </tr>
					<tr>
					<td align="right">状态:</td>
					<td align="left">{*html_radios name=ad_status options=$cf_info_var['ad_status'] checked=$row['ad_status']|default:'1' *}</td>
				    </tr>
				</tbody>
			    </table>
                            <div class="pt_8" align="center"><input type="submit" name="Submit" value="提 交" class="myinput" />
                                &nbsp;&nbsp;
				<input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></div>
                        </form>
                    </div>
                </div>
                <div class="content_main_bottom">
                    <div class="content_main_bottom_left"></div>
                    <div class="content_main_bottom_right"></div>
                </div>

                {*elseif $cf_action=='detail'*}

		<div class="content_panel_title">
                    <div class="contentpanelleft"></div>
                    <div class="contentpanelcenter">
                        <span class="contentpanelcenter_font">轮播图详情</span>
                        <span><a class="edit at" href="{*$cf_self_page*}?dpt={*$cf_dpt*}">轮播图管理</a></span></div>
                    <div class="contentpanelrihgt"></div>
                </div>
                <div class="content_table_center_style">
                    <div class="p8">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tbl tbl_nbr">
							    <tbody>
							    </tbody>
							    <tbody>
								<tr>
								    <td colspan="2" class="stitle">轮播图信息</td>
								</tr>
								<tr>
								    <td width="18%" align="right">轮播图标题:</td>
								    <td width="82%" align="left">{*$row['ad_title']*}</td>
								</tr>
                                <tr>
								    <td width="18%" align="right">价格:</td>
								    <td width="82%" align="left">{*$row['ad_price']*}</td>
								</tr>
							
								<tr>
									<td align="right">轮播图类型:</td>
									<td align="left">{*$cf_info_var['ad_type'][$row['ad_type']]*}</td>
								</tr>
								<tr>
								    <td height="69" align="right">轮播图图片:</td>
								    <td align="left"><a href="{*$row['ad_photo']*}" target="new"><img src="{*$row['ad_photo']*}"  /></a></td>
								</tr>
								<tr>
								    <td align="right">轮播图URL:</td>
								    <td align="left">{*$row['ad_url']*}</td>
								</tr>
								<tr>
									<td align="right">备注:</td>
									<td align="left">{*$row['ad_remark']*}</td>
								</tr>
								<tr>
									<td align="right">状态:</td>
									<td align="left">{*$cf_info_var['ad_status'][$row['ad_status']]*}</td>
								</tr>
								
								<tr>
								    <td align="right">排列序号:</td>
								    <td align="left">{*$row['ad_order']*}</td>
								</tr>
								<tr>
								    <td align="right">创建时间:</td>
								    <td align="left">{*$row['ad_create_time']*}</td>
								    </tr>
								<tr>
									<td colspan="2" align="center"><input type="button" name="back" value="返 回" onclick="window.history.back()" class="myinput" /></td>
									</tr>
								</tbody>

							</table>

		    </div>
		    <div class="content_main_bottom">
			<div class="content_main_bottom_left"></div>
			<div class="content_main_bottom_right"></div>
		    </div>
		   


		    {*else*}

		    <script type="text/javascript">
		
			$(function(){
			    $("#search_form").submit(function(){
				/*if($("#skey").val()=='' ){
				    my_alert('请输入掌友名称','操作提示',"$('#skey').focus()");
				    return false;
				};*/
							
			    });

			})

		    </script>
		    <div class="pannel">
			<div class="pl"></div>
			<div class="pr"></div>
			<div class="pc1">
			    <form action="" method="get" id="search_form" name="search_form">
				<input name="dpt" id="dpt" type="hidden" value="{*$cf_dpt*}" />
                <input name="self" id="self" type="hidden" value="{*$self*}" />
				<div class="pt">
				    标题:
				   <input type="text" size="20" id="skey" name="skey" class="tet" value="{*$skey*}" />				   
				   <input type="image" src="public/images/admin/icon_search_btn.gif" />
				</div>
			    </form>
			</div>
		    </div>
		    <div class="content_panel_title">
			<div class="contentpanelleft"></div>
			<div class="contentpanelcenter">
			    <span class="contentpanelcenter_font">轮播图管理</span>
			    <span><a class="edit at" href="{*$cf_self_path*}-act_add.htm?dpt={*$cf_dpt*}">添加轮播图</a></span>&nbsp;
			</div>
			<div class="contentpanelrihgt"></div>
		    </div>
		    <div class="content_table_center_style">
			<div class="p8">
			    <div class="bq clearfix">
				<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}" class="{*if $self==''*}active{*/if*}">所 有 </a></b>
				{*foreach $cf_info_var['ad_type'] as $key=>$value*}
				{*if $key==$self && $self!=''*}
				{*$class='active'*}
				{*else*}
				{*$class=''*}
				{*/if*}
				<b><a href="{*$cf_self_path*}-act_index.htm?dpt={*$cf_dpt*}&self={*$key*}" class="{*$class*}" >{*$value*}</a></b>
				{*/foreach*}
			    </div>
			    <form name="list_form" id="list_form" method="post" action="{*$cf_self_page*}">
				<input name="act" type="hidden" value="all" />
				<input name="dpt" type="hidden" value="{*$cf_dpt*}" />
				<table width="100%" class="tbl tbl_nbr">
				    <thead>
					<tr class="thd">
					  <td width="8%" align="center" class="thr">序号</td>
					    <td width="20%" align="center" class="thr">标题</td>
					    <td width="14%" align="center" class="thr">价格</td>
					    <td width="9%" align="center" class="thr">类型</td>
					    <td width="19%" align="center" class="thr">展示图片</td>
					    <td width="5%" align="center" class="thr">状态</td>
					    <td width="7%" align="center" class="thr">ID</td>
					    <td colspan="2" align="center" class="thr">操作</td>
					</tr>
				    </thead>
				    <tbody>
					{*foreach $data_ary as $item*}
					

					<tr onmouseout="this.style.backgroundColor='#ffF'" onmouseover="this.style.backgroundColor='#ffC'">
					  <td align="center">{*$item['ad_order']*}</td>
					    <td align="left"><a href="{*$cf_self_path*}-act_detail_id_{*$item['ad_id']*}.htm?dpt={*$cf_dpt*}" class="edit">{*$item['ad_title']*}</a></td>
					    <td align="left">￥{*$item['ad_price']*}</td>
					    <td align="center">{*$cf_info_var['ad_type'][$item['ad_type']]*}</td>
					    <td align="center"><a href="{*$item['ad_photo']*}" target="_blank"><img src="{*$item['ad_photo']*}" width="200" height="100" /></a> </td>
					    <td align="center">{*$cf_info_var['ad_status'][$item['ad_status']]*}</td>
					    <td align="center">{*$item['ad_id']*}</td>
					    <td width="5%" align="center"><a href="{*$cf_self_path*}-act_edit_id_{*$item['ad_id']*}.htm?dpt={*$cf_dpt*}" class="edit">修改</a></td>
					    <td width="13%" align="center"><a href="{*$cf_self_path*}-act_del_id_{*$item['ad_id']*}.htm" class="del" onclick="return confirm('你确定要删除吗?')">删除</a></td>
					</tr>

					{*/foreach*}


					<tr class="tft">
					    <td colspan="12" style="padding:0;">
						<table width="100%" border="0">
						    <tr>
							<td width="6%" align="center" style="border:0;padding:0;"><!--<input type="button" name="checkall" id="checkall" class="myinput" value="全 选" />--></td>
							<td width="22%" align="center" style="border:0;padding:0;">
							    <!--<select name="alltype" id="alltype">
								<option selected="selected" value="">操作選擇</option>
							    </select>
							    &nbsp;<input type="submit" name="submit_all" id="submit_all" value="批量操作" class="myinput" />--></td>
							<td width="72%" style="border:0;padding:0;" ><div class="turnPage"><p>{*$page*}</p></div></td>
						    </tr>
						</table>                                </td>
					</tr>
				    </tbody>
				</table>
			    </form>
			</div>
		    </div>
		    <div class="content_main_bottom">
			<div class="content_main_bottom_left"></div>
			<div class="content_main_bottom_right"></div>
		    </div>

		    {*/if*}
		</div>        </td>
    </tr>
</table>
{*include file="template/admin_foot.htm"*}